﻿//-----------------------------------------------------------------------
// <copyright file="FormulaThenType.cs" company="tuliprules.org">
//     Copyright (c) 2011 tuplelister, tuliprules.org.
// </copyright>
// <summary>This is the FormulaThenType class.</summary>
//-----------------------------------------------------------------------
namespace Tulip.Rules.Models.Rif.Core
{
    using System;
    using System.ComponentModel;
    using System.Xml.Serialization;

    /// <summary>
    /// Represents the formula-then type.
    /// </summary>
    [Serializable]
    [DesignerCategory(@"code")]
    [XmlType(TypeName = "formula-then.type", Namespace = "http://www.w3.org/2007/rif#")]
    [XmlRoot("formula-then.type", Namespace = "http://www.w3.org/2007/rif#", IsNullable = true)]
    public class FormulaThenType : IRifCoreElement
    {
        /// <summary>
        /// The item field.
        /// </summary>
        [EditorBrowsable(EditorBrowsableState.Never)]
        private object itemField;

        /// <summary>
        /// Gets or sets an atom or frame.
        /// </summary>
        [XmlElement("Atom", typeof(Atom), Order = 0)]
        [XmlElement("Frame", typeof(Frame), Order = 0)]
        public object Item
        {
            get
            {
                return this.itemField;
            }

            set
            {
                this.itemField = value;
            }
        }
    }
}